/ Assembly List / LJCNetCommon / NetCommon / ConfigBool

Namespace - LJCNetCommon


Parameters
key - The key value.

Returns

The bool config value.

Syntax

C#
public static Boolean ConfigBool(String key)

Retrieves the Config bool value. (RE)

Remarks

This uses the program config file which is the name of the program plus the extension ".config".

// An example config file.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="LocalDbDataAccess" value="true" />
</appSettings>
</configuration>

Example

C#
using LJCNetCommon;
        
// This returns true.
bool localDbAccess = NetCommon.ConfigBool("LocalDbDataAccess");

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.